<?php echo $this->Form->create('User', array('enctype' => 'multipart/form-data', 'class' => 'form-horizontal','inputDefaults' => array(
    'format' => array('before', 'label', 'between', 'input', 'error', 'after'),
    'div' => array('class' => 'control-group'),
    'label' => array('class' => 'control-label'),
    'between' => '<div class="controls">',
    'after' => '</div>',
    'error' => array('attributes' => array(
            'wrap' => 'span', 'class' => 'help-inline'
    )),), 
	//'novalidate' => 'novalidate'
	));
?>
<?php echo $this->Form->input('name',array(
	'label' => array(
		'text' => 'name', 
		'class' => 'control-label'))); ?>
<?php echo $this->Form->input('email',array(
	'label' => array(
		'text' => 'email', 
		'class' => 'control-label'))); ?>
<?php echo $this->Form->input('dob',array(
	'type'=>'date',
	'dateFormat'=>'DMY',
	'empty'=>array('- -'), 
	'minYear' => date('Y') - 110,
	'maxYear' => date('Y') - 0,
	'label' => array(
		'text' => 'Date Of Birth', 
		'class' => 'control-label'))); ?>

<?php echo $this->Form->submit('Submit', array('class' => 'btn btn-info', 'div' => array('class' => 'control-group'),  'before' => '<div class="controls">','after' => '</div>')); ?>
<?php echo $this->Form->end(); ?>
<?php 
	echo 'or';
	echo '<br/>';
	echo $this->Html->link('Login With Facebook',array('controller'=>'users', 'action'=>'facebook_login'));
?>